<template>
  <el-image v-bind="attrs"> </el-image>
</template>

<script setup>
import { getCurrentInstance } from 'vue'
import { filterAttr, handleObject } from '../../common/util'
defineOptions({ name: 'ImageCom' })

const props = defineProps({
  schema: {
    type: Object,
    required: true
  }
})
const instance = getCurrentInstance()
const _schema = props.schema
const attrs = handleObject(filterAttr(_schema), instance)
if (attrs['preview-src-list']) {
  attrs['preview-src-list'] = attrs['preview-src-list'].split(',')
}
</script>
